package com.design.interpreter;

/**
 * @author leali
 * @title: AndNode
 * @projectName design
 * @description: And解释：非终结符表达式
 * @date 2022/1/3 18:14
 */
public class AndNode extends AbstractNode {
    private final AbstractNode left;
    private final AbstractNode right;

    public AndNode(AbstractNode left, AbstractNode right) {
        this.left = left;
        this.right = right;
    }

    @Override
    public String interpret() {
        return left.interpret() + "再" + right.interpret();
    }
}
